using System;
using Microsoft.Build.Framework;

namespace FitNesse4Net.MSBuidTasks
{
    public static class MSBuildHelper
    {
        public static void LogError(IBuildEngine buildEngine, string format, params object[] values)
        {
            var args = new BuildErrorEventArgs("FitNesse", "", "", -1, -1, -1, -1, string.Format(format, values), "", "");
            buildEngine.LogErrorEvent(args);
        }

        public static void LogMessage(IBuildEngine buildEngine, string format, params object[] values)
        {
            var args = new BuildMessageEventArgs(string.Format(format, values), "", "", MessageImportance.Normal);
            buildEngine.LogMessageEvent(args);
        }
    }
}